﻿// This code is released under the BSD license.
namespace PugLib.UnitTest
{
    using System;
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    using UI.Controls;

    /// <summary>
    ///This is a test class for PugDialogTest and is intended
    ///to contain all PugDialogTest Unit Tests
    ///</summary>
    [TestClass]
    public class PugDialogTest
    {
        /// <summary>
        ///A test for PugDialog Constructor
        ///</summary>
        [TestMethod]
        public void PugDialogConstructorTest()
        {
            using (PugDialog dialog = new PugDialog())
            {
                dialog.DialogImage = PugDialogImage.Information;
                dialog.AddButton(new PugDialogButton
                                     {
                                         Image = Images.New,
                                         TextPrimary = "OH HAI",
                                         TextSecondary = "I'm in ur dialog",
                                         Result = PugDialogResult.Ok
                                     });
                dialog.AddButton(new PugDialogButton
                                     {
                                         Image = Images.Delete,
                                         TextPrimary = "LULZ",
                                         TextSecondary = "gimpy buttuns, let me show you zem",
                                         Result = PugDialogResult.Cancel
                                     });
                dialog.AddButton(new PugDialogButton
                                     {
                                         Image = Images.Help,
                                         TextPrimary = "INTERBUTTS",
                                         TextSecondary = "FULL OF LULZ, KTHXBYE?",
                                         Result = PugDialogResult.Save
                                     });

                dialog.AddButton(new PugDialogButton
                                     {
                                         Image = Images.Globe,
                                         TextPrimary = "I IZ WUrld",
                                         TextSecondary = "My house, let me show you it.",
                                         Result = PugDialogResult.Ok
                                     });
                dialog.AddButton(new PugDialogButton
                                     {
                                         Image = Images.Important,
                                         TextPrimary = "OH NOES",
                                         TextSecondary = "MAIN SCREEN NO TURN ON",
                                         Result = PugDialogResult.Cancel
                                     });
                dialog.TestShow();

                PugDialogResult result = dialog.Result;
                Console.WriteLine("you picked " + result);
            }
        }
    }
}